A fast algorithm to generate necklaces with fixed content
نویسنده
چکیده
We develop a fast algorithm for listing all necklaces with &xed content. By &xed content, we mean the number of occurrences of each alphabet symbol is &xed. Initially, we construct a simple but ine4cient algorithm by making some basic modi&cations to a recursive necklace generation algorithm. We then improve it by using two classic combinatorial optimization techniques. An analysis using straight forward bounding techniques is used to prove that the algorithm runs in constant amortized time. c © 2003 Elsevier Science B.V. All rights reserved.
منابع مشابه
Fast Algorithms to Generate Necklaces, Unlabeled Necklaces, and Irreducible Polynomials over GF(2)
Many applications call for exhaustive lists of strings subject to various constraints, such as inequivalence under group actions. A k-ary necklace is an Ž . equivalence class of k-ary strings under rotation the cyclic group . A k-ary unlabeled necklace is an equivalence class of k-ary strings under rotation and permutation of alphabet symbols. We present new, fast, simple, recursive algoŽ . rit...
متن کاملGenerating Lyndon brackets.: An addendum to: Fast algorithms to generate necklaces, unlabeled necklaces and irreducible polynomials over GF(2)
It is well known that the Lyndon words of length n can be used to construct a basis for the n-th homogeneous component of the free Lie algebra. We develop an algorithm that uses a dynamic programming table to efficiently generate the standard bracketing for all Lyndon words of length n, thus constructing a basis for the n-th homogeneous component of the free Lie algebra. The algorithm runs in l...
متن کاملA Gray code for fixed-density necklaces and Lyndon words in constant amortized time
This paper develops a constant amortized time algorithm to produce a cyclic cool-lex Gray code for fixed-density binary necklaces, Lyndon words, and pseudo-necklaces. It is the first Gray code for these objects that achieves this time bound. The algorithm is applied: (i) to develop a constant amortized time cyclic Gray code for necklaces, Lyndon words, and pseudo-necklaces ordered by density an...
متن کاملA CAT Gray code for fixed-density necklaces and Lyndon words
This paper develops a constant amortized time algorithm to produce the cyclic cool-lex Gray code for fixed-density binary necklaces, Lyndon words, and pseudo-necklaces. It is the first Gray code for these objects that achieves this time bound. In addition to Gray code order, the algorithms can be easily modified to output the strings in co-lex order.
متن کاملA Gray Code for Necklaces of Fixed Density
A necklace is an equivalence class of binary strings under rotation In this paper we present a Gray code listing of all n bit necklaces with d ones so that i each necklace is listed exactly once by a representative from its equivalence class and ii successive representatives including the last and the rst in the list di er only by the transposition of two bits The total time required is O nN n ...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید
ثبت ناماگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید
ورودعنوان ژورنال:
- Theor. Comput. Sci.
دوره 1-3 شماره
صفحات -
تاریخ انتشار 2003